<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<link rel="shortcut icon" type="image/png" href="../assets/img/favicon.ico">

	<link rel="stylesheet" href="../assets/lib/cssgrids.css">
	<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">

	<script src="../assets/lib/yui-min.js"></script>
	<script src="../assets/js/api-prettify.js"></script>
	<script src="../assets/js/api-filter.js"></script>
	<script src="../assets/js/api-list.js"></script>
	<script src="../assets/js/api-search.js"></script>
	<script src="../assets/js/api-docs.js"></script>

	<title>nunuStudio Program</title>
</head>
<body class="yui3-skin-sam">
	<div id="doc">
		<div id="hd" class="yui3-g header">
			<div class="yui3-u-3-4">
					<h1><a href="../index.html"><img src="../assets/img/logo.png" title=""></a></h1>
			</div>
		</div>
		<div id="bd" class="yui3-g">
			<div class="yui3-u-1-4">
				<div id="docs-sidebar" class="sidebar">
					<div id="api-list">
						<h2 class="off-left">APIs</h2>
						<div id="api-tabview" class="tabview">
							<div id="api-tabview-filter">
								<input type="search" id="api-filter" placeholder="Type to filter APIs">
							</div>
							<ul class="tabs">
								<li><a href="#api-classes">Classes</a></li>
								<li><a href="#api-modules">Modules</a></li>
							</ul>
							<div id="api-tabview-panel">
								<ul id="api-classes" class="apis classes">
									<li><a href="../classes/AfterimagePass.html">AfterimagePass</a></li>
									<li><a href="../classes/AmbientLight.html">AmbientLight</a></li>
									<li><a href="../classes/AnimationMixer.html">AnimationMixer</a></li>
									<li><a href="../classes/AnimationTimer.html">AnimationTimer</a></li>
									<li><a href="../classes/App.html">App</a></li>
									<li><a href="../classes/ARHandler.html">ARHandler</a></li>
									<li><a href="../classes/ArraybufferUtils.html">ArraybufferUtils</a></li>
									<li><a href="../classes/Audio.html">Audio</a></li>
									<li><a href="../classes/AudioEmitter.html">AudioEmitter</a></li>
									<li><a href="../classes/AudioLoader.html">AudioLoader</a></li>
									<li><a href="../classes/Base64Utils.html">Base64Utils</a></li>
									<li><a href="../classes/BaseNode.html">BaseNode</a></li>
									<li><a href="../classes/BillboardGroup.html">BillboardGroup</a></li>
									<li><a href="../classes/BloomPass.html">BloomPass</a></li>
									<li><a href="../classes/BokehPass.html">BokehPass</a></li>
									<li><a href="../classes/BufferUtils.html">BufferUtils</a></li>
									<li><a href="../classes/ByteArrayUtils.html">ByteArrayUtils</a></li>
									<li><a href="../classes/CanvasSprite.html">CanvasSprite</a></li>
									<li><a href="../classes/CanvasTexture.html">CanvasTexture</a></li>
									<li><a href="../classes/CapsuleBufferGeometry.html">CapsuleBufferGeometry</a></li>
									<li><a href="../classes/ColorifyPass.html">ColorifyPass</a></li>
									<li><a href="../classes/CompressedTexture.html">CompressedTexture</a></li>
									<li><a href="../classes/CopyPass.html">CopyPass</a></li>
									<li><a href="../classes/CSS3DObject.html">CSS3DObject</a></li>
									<li><a href="../classes/CSS3DRenderer.html">CSS3DRenderer</a></li>
									<li><a href="../classes/CSS3DSprite.html">CSS3DSprite</a></li>
									<li><a href="../classes/CubeCamera.html">CubeCamera</a></li>
									<li><a href="../classes/CubeTexture.html">CubeTexture</a></li>
									<li><a href="../classes/DataTexture.html">DataTexture</a></li>
									<li><a href="../classes/DirectionalLight.html">DirectionalLight</a></li>
									<li><a href="../classes/DirectionalLightCSM.html">DirectionalLightCSM</a></li>
									<li><a href="../classes/DotScreenPass.html">DotScreenPass</a></li>
									<li><a href="../classes/EffectComposer.html">EffectComposer</a></li>
									<li><a href="../classes/EventManager.html">EventManager</a></li>
									<li><a href="../classes/FileSystem.html">FileSystem</a></li>
									<li><a href="../classes/FilmPass.html">FilmPass</a></li>
									<li><a href="../classes/FirstPersonControls.html">FirstPersonControls</a></li>
									<li><a href="../classes/Fog.html">Fog</a></li>
									<li><a href="../classes/Font.html">Font</a></li>
									<li><a href="../classes/FontLoader.html">FontLoader</a></li>
									<li><a href="../classes/FXAAPass.html">FXAAPass</a></li>
									<li><a href="../classes/Gamepad.html">Gamepad</a></li>
									<li><a href="../classes/GeometryLoader.html">GeometryLoader</a></li>
									<li><a href="../classes/Group.html">Group</a></li>
									<li><a href="../classes/Gyroscope.html">Gyroscope</a></li>
									<li><a href="../classes/HemisphereLight.html">HemisphereLight</a></li>
									<li><a href="../classes/HTMLView.html">HTMLView</a></li>
									<li><a href="../classes/HueSaturationPass.html">HueSaturationPass</a></li>
									<li><a href="../classes/Image.html">Image</a></li>
									<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
									<li><a href="../classes/InstancedMesh.html">InstancedMesh</a></li>
									<li><a href="../classes/Key.html">Key</a></li>
									<li><a href="../classes/Keyboard.html">Keyboard</a></li>
									<li><a href="../classes/LegacyGeometryLoader.html">LegacyGeometryLoader</a></li>
									<li><a href="../classes/LensFlare.html">LensFlare</a></li>
									<li><a href="../classes/LightProbe.html">LightProbe</a></li>
									<li><a href="../classes/LocalStorage.html">LocalStorage</a></li>
									<li><a href="../classes/Material.html">Material</a></li>
									<li><a href="../classes/MaterialLoader.html">MaterialLoader</a></li>
									<li><a href="../classes/MathUtils.html">MathUtils</a></li>
									<li><a href="../classes/Measurement.html">Measurement</a></li>
									<li><a href="../classes/Mesh.html">Mesh</a></li>
									<li><a href="../classes/Model.html">Model</a></li>
									<li><a href="../classes/Mouse.html">Mouse</a></li>
									<li><a href="../classes/NodeScript.html">NodeScript</a></li>
									<li><a href="../classes/Nunu.html">Nunu</a></li>
									<li><a href="../classes/Object3D.html">Object3D</a></li>
									<li><a href="../classes/ObjectLoader.html">ObjectLoader</a></li>
									<li><a href="../classes/ObjectUtils.html">ObjectUtils</a></li>
									<li><a href="../classes/OperationNode.html">OperationNode</a></li>
									<li><a href="../classes/OrbitControls.html">OrbitControls</a></li>
									<li><a href="../classes/OrthographicCamera.html">OrthographicCamera</a></li>
									<li><a href="../classes/ParametricBufferGeometry.html">ParametricBufferGeometry</a></li>
									<li><a href="../classes/ParticleDistributions.html">ParticleDistributions</a></li>
									<li><a href="../classes/ParticleEmitter.html">ParticleEmitter</a></li>
									<li><a href="../classes/ParticleEmitterControl.html">ParticleEmitterControl</a></li>
									<li><a href="../classes/ParticleEmitterControlOptions.html">ParticleEmitterControlOptions</a></li>
									<li><a href="../classes/ParticleGroup.html">ParticleGroup</a></li>
									<li><a href="../classes/Pass.html">Pass</a></li>
									<li><a href="../classes/PerspectiveCamera.html">PerspectiveCamera</a></li>
									<li><a href="../classes/PhysicsGenerator.html">PhysicsGenerator</a></li>
									<li><a href="../classes/PhysicsObject.html">PhysicsObject</a></li>
									<li><a href="../classes/PointLight.html">PointLight</a></li>
									<li><a href="../classes/PositionalAudio.html">PositionalAudio</a></li>
									<li><a href="../classes/Program.html">Program</a></li>
									<li><a href="../classes/PythonScript.html">PythonScript</a></li>
									<li><a href="../classes/RectAreaLight.html">RectAreaLight</a></li>
									<li><a href="../classes/RendererConfiguration.html">RendererConfiguration</a></li>
									<li><a href="../classes/RendererState.html">RendererState</a></li>
									<li><a href="../classes/RenderPass.html">RenderPass</a></li>
									<li><a href="../classes/Resource.html">Resource</a></li>
									<li><a href="../classes/ResourceManager.html">ResourceManager</a></li>
									<li><a href="../classes/RoundedBoxBufferGeometry.html">RoundedBoxBufferGeometry</a></li>
									<li><a href="../classes/Scene.html">Scene</a></li>
									<li><a href="../classes/Script.html">Script</a></li>
									<li><a href="../classes/ShaderAttribute.html">ShaderAttribute</a></li>
									<li><a href="../classes/ShaderPass.html">ShaderPass</a></li>
									<li><a href="../classes/ShaderUtils.html">ShaderUtils</a></li>
									<li><a href="../classes/SimplexNoise.html">SimplexNoise</a></li>
									<li><a href="../classes/Skeleton.html">Skeleton</a></li>
									<li><a href="../classes/SkinnedMesh.html">SkinnedMesh</a></li>
									<li><a href="../classes/Sky.html">Sky</a></li>
									<li><a href="../classes/SobelPass.html">SobelPass</a></li>
									<li><a href="../classes/SpineAnimation.html">SpineAnimation</a></li>
									<li><a href="../classes/SpineTexture.html">SpineTexture</a></li>
									<li><a href="../classes/SpotLight.html">SpotLight</a></li>
									<li><a href="../classes/Sprite.html">Sprite</a></li>
									<li><a href="../classes/SpriteSheetTexture.html">SpriteSheetTexture</a></li>
									<li><a href="../classes/SSAONOHPass.html">SSAONOHPass</a></li>
									<li><a href="../classes/SSAOPass.html">SSAOPass</a></li>
									<li><a href="../classes/SSAOShader.html">SSAOShader</a></li>
									<li><a href="../classes/TargetConfig.html">TargetConfig</a></li>
									<li><a href="../classes/TechnicolorPass.html">TechnicolorPass</a></li>
									<li><a href="../classes/TerrainBufferGeometry.html">TerrainBufferGeometry</a></li>
									<li><a href="../classes/TextBitmap.html">TextBitmap</a></li>
									<li><a href="../classes/TextFile.html">TextFile</a></li>
									<li><a href="../classes/TextMesh.html">TextMesh</a></li>
									<li><a href="../classes/TextSprite.html">TextSprite</a></li>
									<li><a href="../classes/Texture.html">Texture</a></li>
									<li><a href="../classes/TextureLoader.html">TextureLoader</a></li>
									<li><a href="../classes/Timer.html">Timer</a></li>
									<li><a href="../classes/TizenKeyboard.html">TizenKeyboard</a></li>
									<li><a href="../classes/Tree.html">Tree</a></li>
									<li><a href="../classes/TreeUtils.html">TreeUtils</a></li>
									<li><a href="../classes/TwistModifier.html">TwistModifier</a></li>
									<li><a href="../classes/TypedArrayHelper.html">TypedArrayHelper</a></li>
									<li><a href="../classes/UnitConverter.html">UnitConverter</a></li>
									<li><a href="../classes/UnrealBloomPass.html">UnrealBloomPass</a></li>
									<li><a href="../classes/Video.html">Video</a></li>
									<li><a href="../classes/VideoLoader.html">VideoLoader</a></li>
									<li><a href="../classes/VideoStream.html">VideoStream</a></li>
									<li><a href="../classes/VideoTexture.html">VideoTexture</a></li>
									<li><a href="../classes/Viewport.html">Viewport</a></li>
									<li><a href="../classes/VRHandler.html">VRHandler</a></li>
									<li><a href="../classes/WebcamTexture.html">WebcamTexture</a></li>
									<li><a href="../classes/WorkerPool.html">WorkerPool</a></li>
									<li><a href="../classes/WorkerTask.html">WorkerTask</a></li>
									<li><a href="../classes/{Object} ParticleGroupOptions.html">{Object} ParticleGroupOptions</a></li>
								</ul>
					
								<ul id="api-modules" class="apis modules">
									<li><a href="../modules/Animation.html">Animation</a></li>
									<li><a href="../modules/Animations.html">Animations</a></li>
									<li><a href="../modules/Audio.html">Audio</a></li>
									<li><a href="../modules/BinaryUtils.html">BinaryUtils</a></li>
									<li><a href="../modules/Cameras.html">Cameras</a></li>
									<li><a href="../modules/Controls.html">Controls</a></li>
									<li><a href="../modules/Core.html">Core</a></li>
									<li><a href="../modules/Files.html">Files</a></li>
									<li><a href="../modules/Input.html">Input</a></li>
									<li><a href="../modules/Lights.html">Lights</a></li>
									<li><a href="../modules/Loaders.html">Loaders</a></li>
									<li><a href="../modules/Meshes.html">Meshes</a></li>
									<li><a href="../modules/Misc.html">Misc</a></li>
									<li><a href="../modules/Particles.html">Particles</a></li>
									<li><a href="../modules/Physics.html">Physics</a></li>
									<li><a href="../modules/Postprocessing.html">Postprocessing</a></li>
									<li><a href="../modules/Resources.html">Resources</a></li>
									<li><a href="../modules/Runtime.html">Runtime</a></li>
									<li><a href="../modules/Script.html">Script</a></li>
									<li><a href="../modules/Sprite.html">Sprite</a></li>
									<li><a href="../modules/Textures.html">Textures</a></li>
									<li><a href="../modules/THREE.html">THREE</a></li>
									<li><a href="../modules/Utils.html">Utils</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="yui3-u-3-4">
				<!--<div id="api-options">
					Show:
					<label for="api-show-inherited">
						<input type="checkbox" id="api-show-inherited" checked>
						Inherited
					</label>
					<label for="api-show-protected">
						<input type="checkbox" id="api-show-protected">
						Protected
					</label>
					<label for="api-show-private">
						<input type="checkbox" id="api-show-private">
						Private
					</label>
					<label for="api-show-deprecated">
						<input type="checkbox" id="api-show-deprecated">
						Deprecated
					</label>
				</div>-->				<div class="apidocs">
					<div id="docs-main">
						<div class="content">
							<h1>Program Class</h1>
							<div class="box meta">
							
									<div class="extends">
										Extends <a href="../classes/ResourceManager.html" class="crosslink">ResourceManager</a>
									</div>
							
							
										Module: <a href="../modules/Core.html">Core</a>
							
							</div>
							
							
							<div class="box intro">
								<p>Program class contains all the data of a app.</p>
							<p>Is stores and manages all available resources used by the children objects.</p>
							<p>Is responsible for handling runtime tasks, initialization, update, resizes etc.</p>
							
							</div>
							
							
							<div id="classdocs" class="tabview">
								<ul class="api-class-tabs">
									<li class="api-class-tab index"><a href="#index">Index</a></li>
							
										<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
										<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
										<li class="api-class-tab attrs"><a href="#attrs">Attributes</a></li>
								</ul>
							
								<div>
									<div id="index" class="api-class-tabpanel index">
										<h2 class="off-left">Item Index</h2>
							
											<div class="index-section methods">
												<h3>Methods</h3>
							
												<ul class="index-list methods extends">
														<li class="index-item method">
															<a href="#method_add">add</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_arAvailable">arAvailable</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_clone">clone</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_dispose">dispose</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_enterAR">enterAR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_enterVR">enterVR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_exitAR">exitAR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_exitVR">exitVR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_initialize">initialize</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_receiveDataApp">receiveDataApp</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_remove">remove</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_render">render</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_resize">resize</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_sendDataApp">sendDataApp</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_setInitialScene">setInitialScene</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_setMouseKeyboard">setMouseKeyboard</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_setRenderer">setRenderer</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_setScene">setScene</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_toJSON">toJSON</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_update">update</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_updateRenderer">updateRenderer</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_vrAvailable">vrAvailable</a>
							
														</li>
												</ul>
											</div>
							
											<div class="index-section properties">
												<h3>Properties</h3>
							
												<ul class="index-list properties extends">
														<li class="index-item property">
															<a href="#property_app">app</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_ar">ar</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_author">author</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_canvas">canvas</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_clock">clock</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_defaultCamera">defaultCamera</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_defaultScene">defaultScene</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_description">description</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_division">division</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_handlePixelRatio">handlePixelRatio</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_keyboard">keyboard</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_lockPointer">lockPointer</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_manager">manager</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_mouse">mouse</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_name">name</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_renderer">renderer</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_rendererConfig">rendererConfig</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_scene">scene</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_targetConfig">targetConfig</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_version">version</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_vr">vr</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_vrScale">vrScale</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_xrEnabled">xrEnabled</a>
							
														</li>
														<li class="index-item property">
															<a href="#property_xrMode">xrMode</a>
							
														</li>
												</ul>
											</div>
							
											<div class="index-section attrs">
												<h3>Attributes</h3>
							
												<ul class="index-list attrs extends">
														<li class="index-item attr">
															<a href="#attr_XR_AR">XR_AR</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_XR_NONE">XR_NONE</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_XR_VR">XR_VR</a>
														</li>
												</ul>
											</div>
							
									</div>
							
										<div id="methods" class="api-class-tabpanel">
											<h2 class="off-left">Methods</h2>
							
												<div id="method_add" class="method item">
													<h3 class="name"><code>add</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>scene</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Add new scene to this program.</p>
												<p>On the program class only scenes can be added as children.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">scene</code>
																		<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a></span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_arAvailable" class="method item">
													<h3 class="name"><code>arAvailable</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Check if augmented reality is available.</p>
												<p>The program need to be configured for AR and the host device should support the required WebXR modes.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_clone" class="method item">
													<h3 class="name"><code>clone</code></h3>
												
														<span class="paren">()</span>
												
														<span class="returns-inline">
															<span class="type"><a href="../classes/Program.html" class="crosslink">Program</a></span>
														</span>
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Clone program, keeping uuids and every identification attribute.</p>
												<p>Clone method uses the ObjectLoad to serialize and create a new program instance with the same data.</p>
												
													</div>
												
												
														<div class="returns">
															<h4>Returns:</h4>
												
															<div class="returns-description">
																		<span class="type"><a href="../classes/Program.html" class="crosslink">Program</a></span>:
																	<p>Cloned program</p>
												
															</div>
														</div>
												
												</div>
												<div id="method_dispose" class="method item">
													<h3 class="name"><code>dispose</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Dispose program data to avoid memory leaks.</p>
												<p>Called when exiting the program.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_enterAR" class="method item">
													<h3 class="name"><code>enterAR</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Enter virtual reality mode.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_enterVR" class="method item">
													<h3 class="name"><code>enterVR</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Enter virtual reality mode.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_exitAR" class="method item">
													<h3 class="name"><code>exitAR</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Exit augmented reality mode.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_exitVR" class="method item">
													<h3 class="name"><code>exitVR</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Exit virtual reality mode.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_initialize" class="method item">
													<h3 class="name"><code>initialize</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Select initial scene and initialize that scene.</p>
												<p>Automatically called by the runtime.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_receiveDataApp" class="method item">
													<h3 class="name"><code>receiveDataApp</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>data</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Receive external data and pass it to all script instances.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">data</code>
																		<span class="type">Object</span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_remove" class="method item">
													<h3 class="name"><code>remove</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>scene</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Remove Scene from program.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">scene</code>
																		<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a></span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_render" class="method item">
													<h3 class="name"><code>render</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>renderer</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Render current scene to canvas.</p>
												<p>When rendering in VR mode all effects and camera parameters are ignored.</p>
												<p>Renderer should be initialized and passed as argument.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">renderer</code>
																		<span class="type">Renderer</span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_resize" class="method item">
													<h3 class="name"><code>resize</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>x</code>
																</li>
																<li class="arg">
																		<code>y</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Resize the current scene elements.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">x</code>
																		<span class="type">Number</span>
												
												
																	<div class="param-description">
																		<p>Width.</p>
												
																	</div>
												
																</li>
																<li class="param">
																		<code class="param-name">y</code>
																		<span class="type">Number</span>
												
												
																	<div class="param-description">
																		<p>Height.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_sendDataApp" class="method item">
													<h3 class="name"><code>sendDataApp</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>data</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Send data to external app instance.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">data</code>
																		<span class="type">Object</span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_setInitialScene" class="method item">
													<h3 class="name"><code>setInitialScene</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>uuid</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Set a scene as initial scene using its uuid.</p>
												<p>This method is used by the editor.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">uuid</code>
																		<span class="type">String</span>
												
												
																	<div class="param-description">
																		<p>Scene uuid</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_setMouseKeyboard" class="method item">
													<h3 class="name"><code>setMouseKeyboard</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>mouse</code>
																</li>
																<li class="arg">
																		<code>keyboard</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Set program mouse and keyboard.</p>
												<p>Should be set before initialize() is called otherwise a keyboard and mouse are created by default.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">mouse</code>
																		<span class="type"><a href="../classes/Mouse.html" class="crosslink">Mouse</a></span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
																<li class="param">
																		<code class="param-name">keyboard</code>
																		<span class="type"><a href="../classes/Keyboard.html" class="crosslink">Keyboard</a></span>
												
												
																	<div class="param-description">
																		 
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_setRenderer" class="method item">
													<h3 class="name"><code>setRenderer</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>renderer</code>
																</li>
																<li class="arg">
																		<code>configure</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Set program renderer to be used by this program.</p>
												<p>Gets the renderer canvas and uses the parent DOM element of the canvas for DOM division property.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">renderer</code>
																		<span class="type">WebGLRenderer</span>
												
												
																	<div class="param-description">
																		<p>Three.js renderer to be used by this program</p>
												
																	</div>
												
																</li>
																<li class="param">
																		<code class="param-name">configure</code>
																		<span class="type">Bool</span>
												
												
																	<div class="param-description">
																		<p>If true also updates renderer configuration to match rendering quality specified in the program.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_setScene" class="method item">
													<h3 class="name"><code>setScene</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>scene</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Change scene during runtime, this method can receive booth a scene name or a scene object.</p>
												<p>This method should be used inside of script objects during runtime.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">scene</code>
																		<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a> | string</span>
												
												
																	<div class="param-description">
																		<p>Scene object or name of the scene to be used.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_toJSON" class="method item">
													<h3 class="name"><code>toJSON</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>meta</code>
																</li>
																<li class="arg">
																		<code>exportResources</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
														<span class="returns-inline">
															<span class="type">Object</span>
														</span>
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Serialize the object to JSON format.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">meta</code>
																		<span class="type">Object</span>
												
												
																	<div class="param-description">
																		<p>Metadata object passed to the objects and resources toJSON method to store data.</p>
												
																	</div>
												
																</li>
																<li class="param">
																		<code class="param-name">exportResources</code>
																		<span class="type">Boolean</span>
												
												
																	<div class="param-description">
																		<p>If true all resources in the program are exported, else only resources attached to objects are exported.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
														<div class="returns">
															<h4>Returns:</h4>
												
															<div class="returns-description">
																		<span class="type">Object</span>:
																	<p>json Serialized JSON data containing the program, all scenes and resources stored.</p>
												
															</div>
														</div>
												
												</div>
												<div id="method_update" class="method item">
													<h3 class="name"><code>update</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Update program state, this updated all current scene children elements.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_updateRenderer" class="method item">
													<h3 class="name"><code>updateRenderer</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>This method updated the webgl renderer configuration.</p>
												<p>Should be called after changing any rendering related parameter.</p>
												
													</div>
												
												
												
												</div>
												<div id="method_vrAvailable" class="method item">
													<h3 class="name"><code>vrAvailable</code></h3>
												
														<span class="paren">()</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Check if virtual reality is available.</p>
												
													</div>
												
												
												
												</div>
										</div>
							
										<div id="properties" class="api-class-tabpanel">
											<h2 class="off-left">Properties</h2>
							
												<div id="property_app" class="property item">
													<h3 class="name"><code>app</code></h3>
													<span class="type"><a href="../classes/App.html" class="crosslink">App</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Runtime instance used to communication between app and the host webpage.</p>
												<p>Inside the editor communication with the app is simulated on the debug console.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_ar" class="property item">
													<h3 class="name"><code>ar</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Enable augmented reality flag to allow the application to run using AR using WebXR.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_author" class="property item">
													<h3 class="name"><code>author</code></h3>
													<span class="type">String</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Program author, will be stamped when the app is exported.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_canvas" class="property item">
													<h3 class="name"><code>canvas</code></h3>
													<span class="type">Element</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Canvas being used to draw content by the renderer.</p>
												<p>This canvas is where the WebGL rendering context was created.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_clock" class="property item">
													<h3 class="name"><code>clock</code></h3>
													<span class="type">Clock</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Clock object used to measure times between frames.</p>
												<p>The time measured is passed down to the scene and its children elements.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_defaultCamera" class="property item">
													<h3 class="name"><code>defaultCamera</code></h3>
													<span class="type">Camera</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Default camera to be used by scenes where there is no camera.</p>
												<p>On the editor this value is automatically set to the last editor camera point used</p>
												
													</div>
												
												
												
												</div>
												<div id="property_defaultScene" class="property item">
													<h3 class="name"><code>defaultScene</code></h3>
													<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Scene loaded as default on startup.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_description" class="property item">
													<h3 class="name"><code>description</code></h3>
													<span class="type">String</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Program description, will be stamped when the app is exported.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_division" class="property item">
													<h3 class="name"><code>division</code></h3>
													<span class="type">Element</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>DOM Division element that can be used to add html content to the app.</p>
												<p>All content added to this division should be manually removed before the app exits.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_handlePixelRatio" class="property item">
													<h3 class="name"><code>handlePixelRatio</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Flag to indicate if the runtime should handle device pixel ratio.</p>
												<p>If set false the runtime will ignore the pixel ratio, and use in browser coordinates.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_keyboard" class="property item">
													<h3 class="name"><code>keyboard</code></h3>
													<span class="type"><a href="../classes/Keyboard.html" class="crosslink">Keyboard</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Keyboard input object, runtime variable.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_lockPointer" class="property item">
													<h3 class="name"><code>lockPointer</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Flag to control pointer locking, when set true the cursor is locked into the application window.</p>
												
													</div>
												
														<p><strong>Default:</strong> false</p>
												
												
												</div>
												<div id="property_manager" class="property item">
													<h3 class="name"><code>manager</code></h3>
													<span class="type"><a href="../classes/EventManager.html" class="crosslink">EventManager</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Event manager used to attach and manage program events.</p>
												<p>Its created on initialization and destroys on disposal, scripts can attach events to the manager safely during runtime.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_mouse" class="property item">
													<h3 class="name"><code>mouse</code></h3>
													<span class="type"><a href="../classes/Mouse.html" class="crosslink">Mouse</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Mouse input object, runtime variable.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_name" class="property item">
													<h3 class="name"><code>name</code></h3>
													<span class="type">String</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Program name.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_renderer" class="property item">
													<h3 class="name"><code>renderer</code></h3>
													<span class="type">WebGLRenderer</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Renderer being used during runtime.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_rendererConfig" class="property item">
													<h3 class="name"><code>rendererConfig</code></h3>
													<span class="type"><a href="../classes/RendererConfiguration.html" class="crosslink">RendererConfiguration</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Renderer configuration applied to the WebGL renderer.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_scene" class="property item">
													<h3 class="name"><code>scene</code></h3>
													<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Scene currently running in the program, runtime variable.</p>
												<p>Should never be manually defined, change it using the setScene(scene) method.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_targetConfig" class="property item">
													<h3 class="name"><code>targetConfig</code></h3>
													<span class="type"><a href="../classes/TargetConfig.html" class="crosslink">TargetConfig</a></span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Target related configurations applied when exporting the app.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_version" class="property item">
													<h3 class="name"><code>version</code></h3>
													<span class="type">String</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Program version should adhere to semantic versioning, but it is not mandatory.</p>
												
													</div>
												
														<p><strong>Default:</strong> &quot;0.0.0&quot;</p>
												
												
												</div>
												<div id="property_vr" class="property item">
													<h3 class="name"><code>vr</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Enable virtual reality flag, allows the application to run in VR mode.</p>
												<p>VR mode can only be enabled if the system and browser have support for VR using WebXR or WebVR.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_vrScale" class="property item">
													<h3 class="name"><code>vrScale</code></h3>
													<span class="type">Number</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Virtual reality movement scale.</p>
												<p>Indicates the relation between the real movement and virtual world movement.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_xrEnabled" class="property item">
													<h3 class="name"><code>xrEnabled</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>WebX runtime control, true when the app is running in an XR environment.</p>
												<p>XR environment can be VR or AR only one of them can be used at a time.</p>
												
													</div>
												
												
												
												</div>
												<div id="property_xrMode" class="property item">
													<h3 class="name"><code>xrMode</code></h3>
													<span class="type">Number</span>
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Indicates the XR mode currently active.</p>
												
													</div>
												
												
												
												</div>
										</div>
							
										<div id="attrs" class="api-class-tabpanel">
											<h2 class="off-left">Attributes</h2>
							
												<div id="attr_XR_AR" class="attr item">
													<a name="config_XR_AR"></a> 
													<h3 class="name"><code>XR_AR</code></h3>
													<span class="type">Number</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>XR is running in AR mode.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_XR_NONE" class="attr item">
													<a name="config_XR_NONE"></a> 
													<h3 class="name"><code>XR_NONE</code></h3>
													<span class="type">Number</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>No XR mode is enabled.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_XR_VR" class="attr item">
													<a name="config_XR_VR"></a> 
													<h3 class="name"><code>XR_VR</code></h3>
													<span class="type">Number</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>XR is running in VR mode.</p>
												
													</div>
												
												
												
												</div>
										</div>
							
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
